<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page  import="com.ambow.Entity.*" %>
<%@ page  import="com.ambow.dao.*" %>
<%@ page  import="com.ambow.dao.impl.*" %>
<%@ page  import="com.ambow.service.*" %>
<%@ page  import="com.ambow.service.impl.*" %>
<%@ page  import="com.ambow.utils.*" %>
<%@ page  import="com.ambow.servlet.*" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2，关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<title>教材管理系统</title>
<link href="<%=path%>/static/css/css.css" rel="stylesheet" type="text/css" />
<script  type="text/javascript">
function check(){
var o = document.getElementById("cellName");
if(o.value ==''){
alert("输入架位名称");
 document.getElementById("cellName").focus();
return false;
}
var o = document.getElementById("amount");
if(o.value == ''){
	alert("输入盘点数量");
	document.getElementById("amount").focus();
return false;
}
return true;
}


</script>
</head>

<body>
	<h3 id="subTitle">盘点调整</h3>

	<form action="<%=path %>/InventoryServlet?status=query" method="post">
		<table width="90%" border="0" align="center" stock.padding="0"
			stock.spacing="0" class="table">


			<tr>
				<td width="20%" align="right" class="title2">架位：</td>
				<td class="within2bg">&nbsp; <input name="cellName" id="cellName"
					type="text" class="input2" value="<%=request.getAttribute("cellName") %>" />(*) <input name="Submit2"
					type="submit" class="input2" value="查询" />
				</td>

			</tr>
			
			<tr>
				<td width="20%" align="right" class="title2">盘点数量：</td>
				<td class="within2bg">&nbsp; <input name="amount" id="amount"
					type="text" class="input2" value="<%=request.getAttribute("amount")%>"/>(*)
				  
					
				</td>
			    
			</tr>
		   	</form>
		   	<form method="post" action="<%=path%>/InventoryServlet?status=add" >
			<tr>
				<td width="20%" align="right" class="title2">原因：</td>
				<td class="within2bg">&nbsp; <textarea  id="reason" name="reason" rows=2
						cols=17></textarea></td>
			</tr>
			<tr>
				<th colspan="8" class="p4"><span class="title2">带(*)的为必填的内容</span></th>
			</tr>
       
		</table>

		<center>

			<input name="textfield" type="submit" class="input2" value="调整"
				onclick="javascript:window.alert('盘点调整成功');" /> <input
				name="textfield" type="reset" class="input2" value="重置" />
               <input name="cellName" type="hidden" value="<%=request.getAttribute("cellName") %>"/>
               <input name="amount"  type="hidden" value="<%=request.getAttribute("amount")%>"/>
               <input name="action"  type="hidden" value="<%=request.getAttribute("action")%>"/> 
		</center>

	<HR>

		<table width="90%" border="0" align="center" stock.padding="0"
			stock.spacing="0" class="table">
			<tr>
				<th colspan="10" class="p4"><span class="title2">以下为您所得到教材的详细信息</span></th>
			</tr>
			<tr>
				<td width="8%" align="center" class="title2">架位</td>
				<td width="15%" align="center" class="title2">ISBN</td>
				<td width="20%" align="center" class="title2">教材名</td>
				<td width="8%" align="center" class="title2">作者</td>
				<td width="15%" align="center" class="title2">出版社</td>
				<td width="10%" align="center" class="title2">出版日期</td>
				<td width="8%" align="center" class="title2">版次</td>
				<td width="5%" align="center" class="title2">单价</td>
				<td width="5%" align="center" class="title2">数量</td>
				<td width="5%" align="center" class="title2">选择</td>
			<% 
			List<Stock> list=(List)request.getAttribute("list");
			if(list!=null&&list.size()!=0){
			   for(Stock  stock :list){
				
			%>
			<tr class="within2bg">
				<td align="center"><%=stock.getCell().getName()%></td>
				<td align="center"><%=stock.getTextBook().getISBN()%></td>
				<td align="center"><%=stock.getTextBook().getName() %></td>
				<td align="center"><%=stock.getTextBook().getAuthor() %></td>
				<td align="center"><%=stock.getTextBook().getPublish()%></td>
				<td align="center"><%=stock.getTextBook().getPublishTime()%></td>
				<td align="center"><%=stock.getTextBook().getRevision() %></td>
				<td align="center"><%=stock.getTextBook().getPrice() %></td>
				<td align="center"><%=stock.getAmount()%></td>
				<td class="within2bg">&nbsp; <input type="checkbox"  name="checkbox" value="<%=stock.getTextBook().getId() %>">
				</td>
			

			</tr>
          <%   
		
				
			   }	
				
			}else{%>
        	  <tr align="center" class="within2bg">
				<td colspan="7" class="no_note">没有符合条件的记录</td>
			</tr>
			<%
			}
			
			%>
			 </form>
		</table>
</body>
</html>